<?php
/**
 * Created by PhpStorm.
 * User: 76683
 * Date: 2018/8/5
 * Time: 22:09
 */

namespace app\api\validate;


use think\Validate;

class WeTopic extends Validate
{
    protected $rule = [
        'content'=>'require',
        'category_id'=>'require|integer'
    ];

    protected $message = [
        'content.require'=>'请输入话题内容',
        'category_id.require'=>'请选择领域',
        'category_id.integer'=>'领域错误'
    ];

    protected $scene =[
        'add'=>['content','category_id']
    ];
}